﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using MementoWeb.Models;

namespace MementoWeb.Controllers
{
    public class WorkLogReportController : ApiController
    {
        private readonly IDataRepository _dataRepository;

        public WorkLogReportController(IDataRepository dataRepository)
        {
            _dataRepository = dataRepository;
        }

        // GET api/worklogreport
        public IEnumerable<WorkLogReportItem> Get(DateTime from, DateTime to, int personId, int projectId)
        {
            return _dataRepository.ReportWorkLoggedByCategory(from, to, personId, projectId);
            
        }
    }
}
